Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use HttpHeaderReader in RequestMessageReader and ResponseMessageReader #1

Open
wants to merge 2 commits into
base: feature/http-header-parser
Choose a base branch
from

Conversation

YairHalberstadt
Copy link
Owner

@YairHalberstadt YairHalberstadt commented Jan 26, 2020

This is in order to test the Http1HeaderReader api.

In order to use it properly I had to change the API of the RequestMessageReader and ResponseMessageReader to return a ParseResult<T>. This leads to more verbose code, but that is natural when using error types in a language without good support for them. C# 9 should hopefully bring DUs which would make handling error cases less verbose.

Other than that, my biggest difficulty was merging an API which took a ReadOnlySequence with one that was tracking position via a SequenceReader. There is no API to advance a SequenceReader till a SequencePosition, so I had to remove usages of SequenceReader.

@davidfowl I'm interested in what you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant